package com.hxd.mall.network.service;

import com.hxd.mall.module.UpdateInfoBean;
import com.hxd.mall.module.product.home.bean.HomeTypeBean;
import com.hxd.mall.module.usercenter.bean.Funsbean;
import com.hxd.mall.module.usercenter.bindorder.bean.BindResultBean;
import com.hxd.mall.module.usercenter.home.OrderListBean;
import com.hxd.mall.module.usercenter.home.PersonInfoBean;
import com.hxd.mall.module.usercenter.invitataion.PosterBean;
import com.hxd.mall.module.usercenter.settings.bean.SettingBean;
import com.hxd.mall.network.base.BaseBean;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * API 商学院页面接口
 */
public interface IMeFunctionApi {

    /**
     * 查询我的页面
     */
    @GET("/mall_user/app/v2/users/access/personal_page")
    Observable<PersonInfoBean> personalInfo();

    /**
     * 查询我的页面banner数据
     */
    @GET("/mall_content/app/v1/person_center_pictures")
    Observable<HomeTypeBean> fetchBanner();

    /**
     * 查询订单列表
     */
    @GET("/mall_order/app/v1/users/access/orders")
    Observable<OrderListBean> getOrderList(@Query("pageNum") Integer pageNum, @Query("pageSize") Integer pageSize, @Query("status") String status);

    /**
     * 订单绑定
     *//*
    @PUT("/mall_order/app/v1/users/access/channels/{channel}/orders/{channelOrderNo}")
    Observable<BindResultBean> bindOrder(@Path("channelOrderNo") String orderId,@Path("channel") String channel);*/

    /**
     * 订单绑定
     */
    @PUT("/mall_order/app/v1/users/access/channels/{channel}/orders/{channelOrderNo}")
    Observable<BindResultBean> bindOrder(@Path("channelOrderNo") String orderId,@Path("channel") String channel,@Body RequestBody requestBody);


    /**
     * 查询我的粉丝
     */
    @GET("/mall_user/app/v1/users/access/fans/children")
    Observable<Funsbean> queryFuns(@Query("pageNum") Integer pageNum, @Query("pageSize") Integer pageSize);

    /**
     * 查询设置数据
     */
    @GET("mall_user/app/v1/users/access/setting_page")
    Observable<SettingBean> getSettings();

    /**
     * 查询海报数据
     */
    @GET("/mall_user/app/v1/users/share")
    Observable<PosterBean> getPosterPage();

    /**
     * 退出登陆
     * @param requestBody
     */
    @POST("/mall_user/app/v1/users/logout")
    Observable<BaseBean> logout(@Body RequestBody requestBody);

    /**
     * 升级
     */
    @GET("/mall_content/app/v1/apps/settings/update")
    Observable<UpdateInfoBean> updateApp();
}
